package com.proj;

import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.dao.ViewTreeManager;

import java.util.Collection;

public class ViewImplement implements ViewInterface {
    public ViewImplement() {
        System.out.println("创建了ViewImplement");
    }

    @Override
    public String newView(String name) {
        ViewTreeManager.newView(name);
        return null;
    }

    @Override
    public String deleteView(String id) {
        ViewTreeManager.deleteView(id);
        return null;
    }

    @Override
    public String moveNode(String from, String to) {
        return null;
    }

    @Override
    public String addNode(String path, JSONObject node) {
        return null;
    }

    @Override
    public String deleteNode(String path, JSONObject node) {
        return null;
    }

    @Override
    public JSONObject getStructureOfChildTree(String path) {
        return ViewTreeManager.getRoot();
    }

    @Override
    public String addTagToNode(String path, String tagId) {
        return null;
    }

    @Override
    public String deleteTagFromNode(String path, String tagId) {
        return null;
    }

    @Override
    public JSONObject getTagUnion(String path) {
        return ViewTreeManager.getTagUnion(path);
    }

    public Collection<JSONObject> fuzzySearch(String searchString, int maxEntry) {
        return null;
    }
}
